home *** CD-ROM | disk | FTP | other *** search
/ Aminet 14 / Aminet 14 - Oct 1996.iso / TCalc / Italiano / TurboCalc3.5Demo / Arexx / TurboCalc.rexx < prev   
OS/2 REXX Batch file  |  1995-10-06  |  868b  |  45 lines

  1. /**********************************************************
  2.  * Test ARexx-Script for TurboCalc © 1993 Michael Friedrich
  3.  **********************************************************/
  4.  
  5. Options FailAt 0
  6. Options Results
  7.  
  8. /* Set TurboCalc-Port */
  9. /*--------------------*/
  10. ADDRESS TCALC
  11.  
  12. /* Get current position */
  13. /*----------------------*/
  14. GETCURSORPOS
  15. oldpos = RESULT
  16. say "Cursor was in Cell" oldpos
  17.  
  18. /* Put something to cell A1  */
  19. /*---------------------------*/
  20. PUT 10 A1
  21.  
  22. /* and Cell A2 */
  23. /*-------------*/
  24. PUT 1.23 A2
  25.  
  26. /* Formula to Cell A3 */
  27. /*--------------------*/
  28. SELECTCELL 'A3'
  29. PUT '=A1+A2'
  30.  
  31. /* and read again: */
  32. /*-----------------*/
  33. GETFORMULA
  34. say "Formula in A3:" RESULT
  35.  
  36. /* Contents (i.e. result of) A3 */
  37. /*------------------------------*/
  38. GETVALUE A3
  39. say "Result:" RESULT
  40.  
  41. /* reset old cell position */
  42. /*-------------------------*/
  43. SELECTCELL oldpos
  44.  
  45.